package com.dqyt.app.controller;

import com.dqyt.app.service.AppLocaGzlqrdService;
import com.dqyt.khjc.bean.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 本地的工作量确认单
 */
@RestController
public class AppLocaGzlqrdController {

    @Autowired
    private AppLocaGzlqrdService appLocaGzlqrdService;


    /**
     * 分页查询待批准工作量确认单  本地
     * @param request
     * @param page
     * @param size
     * @return
     */
    @RequestMapping("/sample/getQrdListPage2")
    public ResultMsg getQrdListPage2(HttpServletRequest request,
                                    String token, long userId,
                                    @RequestParam(defaultValue = "1") Integer page,
                                    @RequestParam(defaultValue = "10") Integer size

    ) {
        ResultMsg resultMsg = appLocaGzlqrdService.getQrdListPage2(request,token,userId,page,size);
        return resultMsg;
    }




    /**
     * 驳回工作量确认单
     * @param request
     * @return
     */
    @RequestMapping(value = "/sample/rejectQrdDal2", method = {RequestMethod.POST})
    public ResultMsg rejectQrdDal2(HttpServletRequest request, long userId, String token, String rwdbh,String bhgyy){
        ResultMsg resultMsg = appLocaGzlqrdService.rejectQrdDal2(request,token,userId,rwdbh,bhgyy);
        return resultMsg;
    }



    /**
     * 设置 通过 通工作量确认单
     * @param request
     * @return
     */
    @RequestMapping(value = "/sample/srtQrdOkProgress2", method = {RequestMethod.POST})
    public  ResultMsg srtQrdOkProgress2(HttpServletRequest request,long userId, String token,String rwdbh){
        ResultMsg resultMsg = appLocaGzlqrdService.srtQrdOkProgress2(request,token,userId,rwdbh);
        return resultMsg;
    }

}
